home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1989 / Jun 89 / V0055-Obj. Pascal Impleme-Jun89 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.7 KB  |  45 lines  |  [TEXT/GEOL]

  1. Item    3479237                         20-June-89        14:09
  2.  
  3. From:   D2086                           Efficient Field Svc, C Faith, PRT
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.         MACDTS                          Macintosh Developer Technical Supt.
  7.  
  8. Sub:    Obj. Pascal Implementation ?s
  9.  
  10. Hello,
  11.  
  12. I have a couple of Object Pascal questions:
  13.  
  14. 1) Is there any way to know inside a method If a particular call is the result
  15. of an INHERITED call of an ancestor subclass of that object or a direct call to
  16. that classes method?
  17.  
  18. I have an abstract class called TAbstract.  It has a method DoSomething.
  19.  
  20. I want to write out warnings if method DoSomething is not OVERRIDEN, but no
  21. warnings if the calls is from an INHERITED statement inside a subclass
  22. DoSomething method OVERRIDE.
  23.  
  24. I suspect this is not possible but don't know for certain.  It would be a nice
  25. feature.
  26.  
  27. 2) Regarding calls to methods inside an object that are in the same segment.
  28. How is this implemented?  Are they JSR calls or do they go through the method
  29. dispatcher?  There is no reason they could not be direct calls but I am not
  30. sure whether the implementation optimizes for this.
  31.  
  32. To be more specific. Suppose I have an object TDemo. It has methods MainMethod
  33. and AuxMethod.  If MainMethod calls AuxMethod and they are both in the same
  34. segment are they implemented as directly as if AuxMethod were merely a routine
  35. not a method,  or does it go through the method tables?  Is the linker that
  36. smart?  What about If they are in different segments?
  37.  
  38. In general, I would like more technical information on the object pascal
  39. implementation, so I can make more intelligent efficiency decisions.
  40.  
  41. Curtis Faith
  42.  
  43.  
  44.  
  45.